using UnityEngine;
using UnityEngine.SceneManagement; // Only needed if loading another scene

public class WinLevel : MonoBehaviour
{
    void OnTriggerEnter2D(Collider2D other)
    {
        // Make sure the player triggered it
        if (other.CompareTag("Player"))
        {
            Debug.Log("Level Complete!");
            SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);

        }
    }
}